package com.sky.mapper;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: WangHongKun
 * @Date: 2022/9/22 16:58
 * @Email: 2028911483@qq.com
 * @Phone: 18683977706
 */

@Mapper
public interface ShoppingCartMapper {

    List<ShoppingCart>  get(ShoppingCart shoppingCart);

    void insert(ShoppingCart shoppingCart);

    List<ShoppingCart>  getList(Long userId);
    @Delete("delete from shopping_cart where user_id =#{userId}")
    void clean(Long userId);


    void addNumber(ShoppingCart shoppingCart);

    void subNumber(ShoppingCart shoppingCart);


    void deleteOne(ShoppingCart shoppingCart);

}
